package com.od.service.serviceImpl;

import com.od.entity.Seeker;
import com.od.mapper.SeekerMapper;
import com.od.service.SeekerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SeekerServiceImpl implements SeekerService {
    @Autowired
    private SeekerMapper seekerMapper;

    @Override
    public List<Seeker> getAllSeeker() {
        return seekerMapper.selectAllSeeker();
    }

    @Override
    public Seeker getSeekerByTel(String tel) {
        return seekerMapper.selectByTel(tel);
    }

    @Override
    public List<Seeker> getSeekerById(String seekerId) {
        return seekerMapper.selectById(seekerId);
    }

    @Override
    public int getIdByTel(String tel) {
        return seekerMapper.selectIdByTel(tel);
    }

    @Override
    public int addSeeker(Seeker seeker) {
        return seekerMapper.insertSeeker(seeker);
    }

    @Override
    public int updateSeekerById(Seeker seeker) {
        return seekerMapper.updateSeekerById(seeker);
    }

}
